home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / Module Com22378772001.psc / frmdoc.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-07-07  |  3.2 KB  |  118 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  3. Begin VB.Form frmdoc 
  4.    Caption         =   "Untitled..."
  5.    ClientHeight    =   2790
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   3780
  9.    Icon            =   "frmdoc.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MDIChild        =   -1  'True
  12.    ScaleHeight     =   2790
  13.    ScaleWidth      =   3780
  14.    Begin RichTextLib.RichTextBox rtext 
  15.       Height          =   2805
  16.       Left            =   0
  17.       TabIndex        =   0
  18.       Top             =   0
  19.       Width           =   3780
  20.       _ExtentX        =   6668
  21.       _ExtentY        =   4948
  22.       _Version        =   393217
  23.       BorderStyle     =   0
  24.       HideSelection   =   0   'False
  25.       ScrollBars      =   3
  26.       TextRTF         =   $"frmdoc.frx":058A
  27.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  28.          Name            =   "Courier New"
  29.          Size            =   9.75
  30.          Charset         =   0
  31.          Weight          =   400
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.    End
  37.    Begin VB.Menu mnedit 
  38.       Caption         =   "edit"
  39.       Visible         =   0   'False
  40.       Begin VB.Menu mnJump 
  41.          Caption         =   "Jump to line in Master File"
  42.       End
  43.       Begin VB.Menu mnJumpCompare 
  44.          Caption         =   "Jump to line in Compare File"
  45.       End
  46.    End
  47. Attribute VB_Name = "frmdoc"
  48. Attribute VB_GlobalNameSpace = False
  49. Attribute VB_Creatable = False
  50. Attribute VB_PredeclaredId = True
  51. Attribute VB_Exposed = False
  52. Option Explicit
  53. Private Sub mnFile1_Click()
  54. End Sub
  55. Private Sub CoolBar1_HeightChanged(ByVal NewHeight As Single)
  56. With rtext
  57.     .Top = 0 + NewHeight
  58.     .Left = 0
  59.     .Width = Me.Width - 125
  60.     .Height = Me.Height - 400 - NewHeight
  61. End With
  62. End Sub
  63. Private Sub Form_Load()
  64. With rtext
  65.     .Top = 0
  66.     .Left = 0
  67.     .Width = Me.Width - 125
  68.     .Height = Me.Height - 400
  69. End With
  70. End Sub
  71. Private Sub Form_Resize()
  72. If Me.WindowState <> 1 Then
  73.     With rtext
  74.         .Top = 0
  75.         .Left = 0
  76.         .Width = Me.Width - 125
  77.         .Height = Me.Height - 400
  78.     End With
  79. End If
  80. End Sub
  81. Private Sub mnJump_Click()
  82. Dim compareline As String
  83. Dim I As Integer
  84. compareline = rtext.SelText
  85. If InStr(1, mastertext, compareline) = 0 Then
  86.     I = 0
  87.     I = InStr(1, mastertext, compareline)
  88. End If
  89. With newdoc(0).rtext
  90.     .SetFocus
  91.     .SelStart = I - 1
  92.     .SelLength = Len(compareline)
  93. End With
  94. End Sub
  95. Private Sub mnJumpCompare_Click()
  96. Dim masterline As String
  97. Dim I As Integer
  98. masterline = rtext.SelText
  99. If InStr(1, comparetext, masterline) = 0 Then
  100.     I = 0
  101.     I = InStr(1, comparetext, masterline)
  102. End If
  103. With newdoc(1).rtext
  104.     .SetFocus
  105.     .SelStart = I - 1
  106.     .SelLength = Len(masterline)
  107. End With
  108. End Sub
  109. Private Sub rtext_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
  110. If Button = 1 Then
  111.     SendKeys "{HOME}"
  112.     SendKeys "+{END}"
  113. End If
  114. If Button = 2 Then
  115.     PopupMenu mnedit
  116. End If
  117. End Sub
  118.